<h3 class="ppm-title"><em>Result : ${gpage.totalCount!}</em><button id="sourceDownload"><img src="/module/base/images/17.png" />Download</button><img id="sourcecloseImg" src="/module/base/images/18.png" /></h3>
<table class="n-tb" style="margin-top: 19px;">
	<thead>
		<tr>
			<th>Isotope</th>
			<th>No</th>
			<th>Source Type</th>
			<th>Content</th>
			<th>Nation</th>
			<th>Downloads</th>
			<th><div class="n-tb-cell">Select<span style="margin-left: 10px;" id="selectAll" class="n-checkbox"></span></div></th>
		</tr>
	</thead>
	
	<tbody id="sourcetbody">
		<#if gpage.result??>
			<#list gpage.result as res>
				<tr id="${res_index}">
					<#assign ist = res.isotopeType!''>
					<#assign ist = ist?replace("δ","<span style='font-style:italic'>δ</span>")?replace("Δ","<span style='font-style:italic'>Δ</span>")>
					<td>${ist}</td>
					<td>${res.no!}</td>
					<td>${res.sourceType!}</td>
					<td>${res.content!}</td>
					<td>${res.nation!}</td>
					<td>${res.dataDowncount!}</td>
					<td><div class='n-tb-cell tdBox'><span onclick='source.checkTD(this);' class='n-checkbox'></span></div></td>
				</tr>
			</#list>
		</#if>
	</tbody>
	
</table>

<div class="n-page" style="margin-top:32px;">
	<span>total ${gpage.totalPages!}</span>
	<#if gpage.totalPages == 1>
		<button onclick="source.changePageNo('1');">1</button>
	<#elseif gpage.totalPages == 2>
		<button onclick="source.changePageNo('1');">1</button>
		<button onclick="source.changePageNo('2');">2</button>
	<#elseif gpage.totalPages gte 3>
		<#if gpage.nextPage gt 3>
			<button onclick="source.changePageNo('${gpage.nextPage-3}');">${gpage.nextPage-3}</button>
			<button onclick="source.changePageNo('${gpage.nextPage-2}');">${gpage.nextPage-2}</button>
			<button onclick="source.changePageNo('${gpage.nextPage-1}');">${gpage.nextPage-1}</button>
		<#else>
			<button onclick="source.changePageNo('1');">1</button>
			<button onclick="source.changePageNo('2');">2</button>
			<button onclick="source.changePageNo('3');">3</button>
		</#if>
	</#if>
	<button id="nextPage" onclick="source.changeNextPageNo(this,'${gpage.totalPages!}');">>>${gpage.nextPage!}</button>
	<button onclick="source.changePageNo('${gpage.totalPages!}');">last</button>
</div>
<script>
//下载
$("#sourceDownload").click(function(){
	if(Object.keys(sourcedowloadIndex).length === 0){
		layer.msg("Please select the  data to download !");
		return;
	}
	source.serarchPageDoc();
})
//关闭
$("#sourcecloseImg").click(function(){
	$(".n-nav-links a").eq(3).click();
})
//全选
$("#selectAll").click(function(){
	if($(this).hasClass("n-checkboxCheck")){//取消
		$(this).removeClass("n-checkboxCheck");
		$("#sourcetbody .n-checkbox").removeClass("n-checkboxCheck");
		for(var index = 0 ; index < sourcedata.length; index++){
			delete sourcedowloadIndex[pageNo+"_"+index];
		}
	}else{//选中
		$(this).addClass("n-checkboxCheck");
		$("#sourcetbody .n-checkbox").addClass("n-checkboxCheck");
		for(var index = 0 ; index < sourcedata.length; index++){
			sourcedowloadIndex[pageNo+"_"+index] = sourcedata[index];
		}
	}
})
</script>